﻿CREATE TABLE [dbo].[TenderAnalysis] (
    [Id]                 UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL,
    [RefNumber]          NVARCHAR (50)    NOT NULL,
    [AnalysisDate]       DATE             NOT NULL,
    [OrderRequestId]     UNIQUEIDENTIFIER NOT NULL,
    [Recommendation]     NTEXT            NULL,
    [SelectedSupplierId] UNIQUEIDENTIFIER NULL,
    [PreparedBy]         UNIQUEIDENTIFIER NOT NULL,
    [SupplierSelected]   BIT              NOT NULL,
    [POToBeIssued]       BIT              NOT NULL,
    [CurrencyId]         UNIQUEIDENTIFIER NOT NULL,
    [CountryProgrammeId] UNIQUEIDENTIFIER NULL,
    [PreparedOn]         DATETIME         NULL,
    [RecordCount]        INT              IDENTITY (1, 1) NOT NULL
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Flag stating whether supplier has been selected', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TenderAnalysis', @level2type = N'COLUMN', @level2name = N'SupplierSelected';

